<script>
  jQuery(document).ready(function() {
    jQuery('#event_title').change(function(){  
                                // alert(jQuery(this).val());
                                id = jQuery(this).val();
                                
                                if(id != "")
                                {
                                  loading_area('<%= image_tag "loading_ajax.gif" %>', "#event-content", "#event-content");
                                  jQuery.ajax({
                                  url: '<%= url_for({:controller => 'events', :action => 'preview_event'}) %>',
                                  data: "eventid="+id,
                                  success: function (data){
                                        jQuery('#event-content').html(data)
                                      }
                                }); 
                                }
                        });
  });
</script>

<div class="innerdiv  half floatleft">

			<h2 class="head-alt">Event</h2>
			<div class="innercontent">
			  
                            <h2>Select Event</h2>		                                                
                            <%= select("event", "title", @events, {:include_blank => 'None'}) %>
                            
                            <div id="event-content"></div>

                          
			</div>
</div>

<div class="innerdiv  half floatright">

			<h2 class="head">Assignment</h2>
			<div class="innercontent">
			  

                          
                          <fieldset>
						<legend>Reporters</legend>
                                                
                            <input class="autoSuggest" type="text" /> 
                            
                          </fieldset>
                          
                          <fieldset>
						<legend>Editor</legend>
                                                
                            <input class="autoSuggest" type="text" /> 
                            
                          </fieldset>
                          
			</div>
</div>

<div class="innerdiv clear">

			<div class="innercontent">
			  
                            <a href="#" id="submit" onclick="$('#new_event').submit();" class='button blue big'>Create</a>
				<a href="<%= url_for({:action => "index"}); %>" class="button gray big">Back to List</a>

                          
			</div>
</div>